#ifndef INPUT_HPP
#define INPUT_HPP
#include <boost/numeric/ublas/vector.hpp>
#include <boost/numeric/ublas/matrix.hpp>
#include <boost/numeric/ublas/matrix_proxy.hpp>
#include <boost/numeric/ublas/io.hpp>
#include <boost/algorithm/string.hpp>
#include <complex>
#include <iostream>
#include <sstream>
#include <fstream>
#include <string>
#include <cstdlib>
#include <map>
#include "ticpp.h"
#define DEBUG 1
using namespace boost::numeric::ublas;

typedef std::map<std::string,std::string> mapdt; 

class JumpOp{
private:
  matrix<double> Op;
  std::string AnalyticRate;
  std::string Type;
  std::map<std::string,double> Params;
  std::string Tag;
  int Dim;
public:
  JumpOp();
  ~JumpOp(){};
  JumpOp(ticpp::Iterator<ticpp::Element> elem);
  void readOp(std::string str,matrix<double>* mat);
};




//!
//!Structure for reading input file
//!
class SimulationParams{
private:
  double Time;
  double TimeStep;
  int EnsembleSize;
  int Dim;
  int OutputStep;
  matrix<double> Basis;
  int EffEnsembleDim;
  std::string mixed;
  vector<std::complex<double> > InitialState;
  
  int NumOfChannels;
  std::vector<JumpOp> JumpOperators;
  std::string EnsembleOut;
  std::string PDistOut;
  std::string RhoOut;
  std::string VarOut;
  std::map<int,std::string> DecRatesOut;
  std::map<int,std::string> LambRatesOut;
  
public:
  //!
  //!Function that does the actual reading
  //!
  SimulationParams(const std::string &filename);
  void readOp(std::string str,matrix<double>* mat);
  void readVec(std::string str,vector<std::complex<double> >* vec);
  SimulationParams(){};
  ~SimulationParams(){};
  //std::istringstream readVec(std::string);


};

#endif
